package com.nhjf.model.postJob;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.system.Organization;
import com.nhjf.model.teachers.CoursesType;
import com.nhjf.model.teachers.Teacher;

@SuppressWarnings("serial")
@Entity
@Table(name = "postJob")
public class PostJob extends BaseModel{
	/**
     * 主键ID
     */
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "native")
    @Column(name = "id", unique = true)
    private Long id;
    /**
     * 作业名称
     */
    @Column(name = "name")
    private String name;
    /**
     *分类
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "typeOne")
    private CoursesType typeOne;
    /**
     * 1全部机构学生，2其它
     */
    @Column(name = "studentType")
    private Integer studentType;
    /**
     * 学生总数
     */
    @Column(name = "studentNum")
    private Integer studentNum;
    /**
     * 开始时间
     */
    @Column(name = "startTime")
    private Date startTime;
    /**
     * 结束时间
     */
    @Column(name = "endTime")
    private Date endTime;
    /**
     * 创建时间
     */
    @Column(name = "creatTime")
    private Date creatTime;
    /**
     * 创建人
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "creatUser")
    private Teacher creatUser;
    /**
     * 机构
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "organizationId")
    private Organization organizationId;
    //已经提交作业学生数量
	@Transient
	private Integer submitNum=0;
	@Transient
	private String createDate;
	
	public String getCreateDate() {
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	public Integer getSubmitNum() {
		return submitNum;
	}
	public void setSubmitNum(Integer submitNum) {
		this.submitNum = submitNum;
	}
	public Integer getStudentNum() {
		return studentNum;
	}
	public void setStudentNum(Integer studentNum) {
		this.studentNum = studentNum;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public CoursesType getTypeOne() {
		return typeOne;
	}
	public void setTypeOne(CoursesType typeOne) {
		this.typeOne = typeOne;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public Date getCreatTime() {
		return creatTime;
	}
	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}
	public Teacher getCreatUser() {
		return creatUser;
	}
	public void setCreatUser(Teacher creatUser) {
		this.creatUser = creatUser;
	}
	public Organization getOrganizationId() {
		return organizationId;
	}
	public void setOrganizationId(Organization organizationId) {
		this.organizationId = organizationId;
	}
	public Integer getStudentType() {
		return studentType;
	}
	public void setStudentType(Integer studentType) {
		this.studentType = studentType;
	}
    
    
}
